package com.ywh.train.bean;

public class Result {
    public final static byte SUCC = 100;
    public final static byte FAIL = 101;
    public final static byte OTHER = 103;
    public final static byte RAND_CODE_ERROR = 104;

    public final static byte NO_BOOKED_TICKET = 11;
    public final static byte HAVE_NO_PAY_TICKET = 12;
    public final static byte CANCEL_TIMES_TOO_MUCH = 13;
    public final static byte REPEAT_BUY_TICKET = 14;
    public final static byte ERROR_CARD_NUMBER = 15;
    public final static byte CURRENT_USER_SOMANY = 16;

    private byte state = FAIL; // 请求处理状态
    private String msg = "未知错误!"; // 有效提示信息

    public byte getState() {
        return state;
    }

    public void setState(byte state) {
        this.state = state;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("Result [state=").append(state).append(", msg=").append(msg).append("]");
        return builder.toString();
    }

}
